<?php

require FCPATH . '/application/controllers/backend/backend.php';

class Home extends Backend {

    public function __construct() {
	parent::__construct();
    }
 
    public function index(){
	$this->load->view('backend/home_index');
    }
    
    public function header(){
	$this->set_layout('backend/simple_layout');
	$this->load_css('backend_home_header');
	$this->rend('home_header');
    }
    
    public function navigation(){
	$this->load->model(array('about_model','service_model'));
	$this->set_layout('backend/simple_layout');
	$this->load_css('backend_home_navigation');
	$this->load_js('backend_home_navigation');
	$this->rend('home_navigation', array(
	    'abouts' => $this->about_model->records(),
	    'services' => $this->service_model->records()
	));
    }
    
    public function welcome(){
	$this->load->model('user_model');
	$user_id = intval($this->session->userdata('g_user_id'));
	$this->rend('home_welcome',array(
	    'user' => $this->user_model->find($user_id)
	));
    }
}
